#导包
from rest_framework import serializers
#导入数据库类
from myapp.models import User, Goods, Category

class UserSer(serializers.ModelSerializer):
    class Meta:
        model = User
        # 声明字段
        fields = '__all__'

class GoodsSer(serializers.ModelSerializer):
    class Meta:
        model = Goods
        # 声明字段
        fields = '__all__'

class CategoryrSer(serializers.ModelSerializer):
    class Meta:
        model = Category
        # 声明字段
        fields = '__all__'